let ifr = document.getElementById('iframe')
ifr.onload = function(){
    let wd = ifr.contentWindow.document.documentElement.scrollWidth;
    let ht = ifr.contentWindow.document.documentElement.scrollHeight;
    let x = document.getElementsByClassName('formData')[0].clientWidth / wd;
    ifr.style.width = wd +'px';
    ifr.style.height = ht +'px';
    ifr.style.transform = `scale(${x})`;
    ifr.style.transformOrigin='0 0';
    
    document.getElementsByClassName('box')[0].style.height = ht*x + 'px'
}